package de.tudarmstadt.ukp.muip.fibqdojo;

import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IFIBQMatchMode;

/**
 * Compares two strings whether they are equal by using the
 * <code>String.equal(String a, String b)</code> method call of the Java-String
 * class. The <code>matchValue</code> is the value the matching call shall
 * return on a successful match. By providing this value in the constructor it
 * is possible to invert the value for a successful comparison what offers
 * flexibility in using the rules for various situations. Hence instead of
 * return <code>true</code> for success <code>false</code> is returned instead
 * and accordingly for <code>false</code> as comparison result <code>true</code>
 * is returned.
 * 
 * @author Tobias Horsmann
 */
public class EqualnessMatchMode implements IFIBQMatchMode {

    @Override
    public boolean match(String a, String b) {
        return a.equals(b);
    }

}
